Getting started

This chapter tells you how to start up HoTMetaL, and gives the basic information you need to start creating and editing files. It contains sections on the following topics:

If you are new to HoTMetaL, you should certainly read this chapter, as it will help you get acquainted with the product and learn about the components and procedures you'll need to get your work done.

Purpose: editors and browsers

HoTMetaL is an editor for creating files that can be read by graphical browsers (such as Mosaic and Netscape) that are connected to the World Wide Web (WWW). The file format for such files is called HTML (Hypertext Markup Language). The main difference between an editor like HoTMetaL and browsers such as Mosaic is that HoTMetaL is for editing files, and browsers are for retrieving, displaying, and reading files. Any text editor can create an HTML file (but we believe that HoTMetaL is a more convenient and pleasant way of doing it). Browsers open a file saved by HoTMetaL, consisting of text and markup, and do things like screen formatting, generating graphical forms, issuing mail messages, and so forth. It's important to understand that the different kinds of programs do different things. There are many browsers available, and they can process the same HTML file in different ways-and these are outside the control of HoTMetaL. What is in HoTMetaL's control is creating correctly marked-up documents. You will find this important because documents are more easily interchanged (displayed by different people using different browsers, for example) when they conform to an agreed standard.

Note: The HTML format is based on the Standard Generalized Markup Language (SGML). All HTML files are SGML files (the converse is not true, however-there are many other file formats described by SGML, so most SGML files are not in HTML format.)

Some browsers have a command (usually called View Source... or a similar name) that lets you see what the HTML format looks like. HoTMetaL provides an easy-to-use, graphical, structured editor for creating files in this format.

An overview of the menus

This section provides a summary of the main features.

Setting the HoTMetaL directory

If you didn't carry out this step when you installed HoTMetaL, you should do so now.

The directory where HoTMetaL is installed is referred to as `the HoTMetaL directory'.

Unless you always run HoTMetaL using an `absolute' path, you must inform HoTMetaL of the location of the HoTMetaL directory explicitly, or it will not be able to find the various auxiliary files and directories that it needs to run. There are two ways to do this:

If you set the HoTMetaL directory using both methods, the value that you specify on the command line will take precedence. If you will be running more than one copy of HoTMetaL, and will have a different HoTMetaL directory for each, you should specify the directories on the command line.

If the HoTMetaL directory is not set, an error message will appear on the standard error stream, and HoTMetaL will not launch.

Creating and editing files

This section gives the basic information needed to start editing files with HoTMetaL.

The first time you launch HoTMetaL, you will get a dialog box displaying registration information.

Creating a new file

When you launch HoTMetaL, a new document will be created. This document consists of the default template file. You can choose the default template using the Preferences... command in the Special menu. You can also create a new file as follows:

This also opens the default template file.

Editing an existing file

If you already have an HTML file that you want to edit:

Once you've done this, HoTMetaL opens the file and you can begin editing.

HoTMetaL will try to open HTML files even if they contain bad markup, but occasionally it will not be able to open a file. See the section Opening a file for more information.

Now what?

Now that you have an open file, you can start entering text and markup. The markup consists of:

If you're unsure of what to do at this point, we suggest that you try the HoTMetaL tutorial which has exercises demonstrating the main features of HoTMetaL and HTML.

Templates

The Open Template... command in the File menu lets you open templates in the templates directory in the HoTMetaL directory.

Toolbars

HoTMetaL has three toolbars, which are located just below the menu bar. The top toolbar (referred to as the `Standard' toolbar) provides quick access to a number of frequently-used menu commands. The middle (`Common HTML') toolbar is for creating the more common HTML elements; the bottom (`Other HTML') toolbar is for creating the less common HTML elements. If you position the mouse pointer above the button, a `tooltip', a short description of what it does, will appear in the message area in the lower left corner of the document window.

The Toolbars... command in the View menu lets you choose which toolbars should be visible.

`Standard' toolbar icons

`HTML' toolbar icons

When you click on a button in either of the HTML toolbars, HoTMetaL will insert an element or change the current element type, as appropriate. See the section Using the toolbars to create markup for more information.

Grayed-out menu items

Menu items for features that are not provided in HoTMetaL but are available in HoTMetaL PRO are present in the menus but are permanently grayed-out. The menu items affected are:

Setting preferences

Many of HoTMetaL's configuration settings (e.g., find options, toolbar visibility, previewing browser) are set from the related dialog boxes. Some settings that don't have a dialog box or command associated with them can be set using the Preferences... command in the Special menu. All of these preferences are `global': they will apply to all open documents, and will be saved for the next editing session. After you've made your choices, click on the [Apply] button.
PREFS

Displaying images

If you want GIF images in your documents to be displayed inline (in place in the document window), turn on the check box labeled Display images after open. This specifies the default behavior for all documents: you can override this setting for individual documents by choosing the Show (Hide) Inline Images command from the View menu. See the chapter Working with images for more information on displaying images.

Default template

The default template is the file that is opened when you create a new document with the New command. Depending on the kind of documents you need to create, you could use a basic template that just has the minimum required elements, or a more detailed template that contains an image representing your company logo, some standard text, etc.

Save options

If you want HoTMetaL to make a backup file each time it saves a file, turn on the check box labeled Make backup file when saving changes. The backup file will be a copy of the previously saved version of the file. The name of the backup file will be the current filename, with the .html extension changed to .bak.

HoTMetaL will save the current file automatically after a specified number of minutes or after a specified number of changes have been made to it. Enter the values you want to use in the appropriate text entry box. The default values are 64000 changes and 1000 minutes. Keeping these defaults effectively turns off the auto-saving feature. If you want HoTMetaL to warn you each time it automatically saves a file, turn on the Inform when automatically saving check box.

If the Break lines on save check box is turned on, HoTMetaL will add a line break to saved files after every 80 characters, except when this would cause the markup to be illegal, or would interfere with formatting and readability, i.e., it will not add a space:

In these cases, HoTMetaL will add a space at the first legal position.

Tooltips

If the Show Tooltips check box is turned on, HoTMetaL will display a `tooltip' when the mouse cursor is above a toolbar button. A tooltip is a short message telling what the button does and is displayed in the message area in the lower left corner of the document window.

Tag icons

You can specify the font, font size, and color that HoTMetaL uses to display the start- and end-tag icons of elements. Your choices are the same as those available for ordinary text via the Styles... command in the View menu.

Print filter

When you print a document using HoTMetaL's Print... command, HoTMetaL creates a PostScript file that it sends to `standard output'. The Print filter text entry box lets you specify a command that the PostScript file is piped to. You can use it to specify:

If you don't need to do any special processing this file should just be sent to to a standard print spooler such as lpr.

Settings in the `hm2rc' file

Much of HoTMetaL's behavior is controlled by the hm2rc file in the HoTMetaL directory and the .hm2rc in your home directory. The .hm2rc file takes precedence and is updated automatically when you make choices from the Preferences dialog, choose a browser with the Preview command, etc. If you "know what you're doing", you can edit the .hm2rc file directly (using a text editor). There are a few settings that can be changed only from this file; some of the more useful ones are:

See also the section on colors for information on how the settings in the hm2rc file affect this feature.

The hm2rc file in the HoTMetaL directory contains comments that explain what the settings do.

After you change the .hm2rc file you must restart HoTMetaL in order for the changes to take effect.

`Special' characters

HTML supports the ISO 8859/1 character set (also called ISO Latin 1) and a number of other `special' characters. To enter a `special' character (one that doesn't have a key on your keyboard) you can:

SPECCHAR

Just click on a character with the mouse to insert it.

Note: When you save a file, non-ASCII characters will be converted to entities. For example, `é' will be converted to `é'.

Showing and hiding tags

By default the HTML tags in your document will appear on the screen as small tag icons. The tags that point to the right are start-tags, indicating the beginning of an element, while those that point to the left are end-tags, indicating the end of an element. If you choose Hide Tags in the View menu, the tags will be hidden. The command will then toggle to Show Tags: choosing this command will display the tags again. The TAGSICON toolbar button is equivalent to this command.

The context view

Choose Show Context View in the Special to display a window showing the sequence of nested elements that ends at the current insertion point or selection. That is, it displays the sequence of open tags at the current position.

The context view can be displayed in two formats. Choose the command One-line Context View to display all the open tags on a single line. Choose Multi-line Context View to display each tag icon on a separate line, with indention to emphasize the nesting. A useful feature of the multi-line context view is that it shows the values of any attributes that have been set for elements in the sequence.

The context window can be removed by clicking on the window menu button in the upper left corner of the window with the [Menu] mouse button and selecting Close from the window menu.

CONTEXT

Using a document outline

The Show Outline View command in the View menu brings up a window that shows the structure of the entire document.

OUTLINE

The outline view shows the hierarchy of the document in a plain, unformatted manner. Each line in the outline view shows a start-tag, an end-tag, and possibly some text between them, and represents one element in the document. The indention of the line indicates the level at which the element is nested. Typing is not recognized in this window, but you can use the toolbar and all the editing commands from the Edit and Markup menus.

Clicking on a start-tag icon allows you to open and close elements, that is, show and hide their contents. When an element is open, all the elements it contains (but not necessarily their sub-elements) are shown as indented lines following that element's line. (To see the contents of sub-elements, open these in turn.)

To select an element in the outline view, you can either click to the left of the start-tag icon and drag the cursor across the icon, or double-click to the left of the start-tag icon. Multiple elements can be selected by clicking the mouse to the left of a start-tag and then dragging down to select successive elements.

If you change documents in the main window, the outline view will display the outline of the new document.

When you display the outline view the command name toggles to Hide Outline View; you can use this command to dismiss the outline view.

Editing in the outline view

Since text entry is not permitted in the outline view, almost all editing is done in the formatted view. The outline view is useful when rearranging whole documents or when creating an outline for your document. It can also be very useful when you are changing styles with the Styles... command.

You can insert, remove, split, etc., elements in the outline view.

If you see something you like...

If you see a web page that contains a typographical effect, form, etc., that you like, then the easiest way of achieving the same thing yourself is to save the file with the browser (make sure you save it in HTML format) and then open it with HoTMetaL. Remember, though, that some files that you download from the web may have incorrect markup. Also note that while document markup is not copyrighted, some graphic images are.

For further information...

The file faq.html in the HoTMetaL installation folder contains titles and URLs for documents that contain information on HTML usage. Open this file with a browser and retrieve the documents that you're interested in.

A number of HTML tutorials, of varying quality, are usually available on the web. Our own tutorial is in the next chapter. The relevant Usenet newsgroups (those in the comp.infosystems.www hierarchy) are also a source of information, including an FAQ (Frequently Asked Questions) list.

Our technical support web pages (accessible from our home page) contain answers to frequently asked questions, particularly those that concern auxiliary technologies such as browsers.